package com.itheima.ui;

/**
 * @author zhangbaiyan
 * @date 2024-09-07 15:56
 * @description:
 * @version:
 */
public class digui {
    public static void main(String[] args) {

        System.out.println(getSum(100));
    }

    private static int getSum(int i) {
        if (i == 1){
            return 1;
        }else {
            return i + getSum(i-1);
        }

    }


}
